package behavior.chain;

/**
 * @author dali
 * @date 2021-07-29 13:20
 * @Description
 */

public class Client {
    public static void main(String[] args) {
        Handler directHandler = new DirectHandler();
        Handler deptHandler = new DeptHandler();
        Handler CEO = new CEOHandler();
        directHandler.setNextHandler(deptHandler);
        deptHandler.setNextHandler(CEO);
        System.out.println(directHandler.handler(14) ? "多谢领导" : "打扰了");
    }
}
